// import { Button, DatePicker, Form, Icon, Input, Spin, Table } from 'antd';
import { ColumnProps } from 'antd/lib/table';
import React from 'react';
import moment from 'moment';
// import { getColumnSearchProps } from '@/pages/finance/withdraw/utils';
// import { checkPermission } from '@/utils/resolvePermission';

interface StateType {
  [propName: string]: any;
}
export const getColumns = (self: any) => {
  const statusMap = {
    0: '处理中',
    1: '成功',
    2: '失败',
  };
  const orderTypeMap = {
    1: '存款',
    2: '提现',
    3: '转账',
    4: '红利',
    5: '返水',
    6: '提现退回',
    10: '减币',
    11: '上分',
    14: '加币',
  };

  const columns: ColumnProps<StateType>[] = [
    {
      title: '调整时间',
      dataIndex: 'createTime',
      width: 130,
      render: time => time && <span>{moment(time).format('YY-MM-DD HH:mm:ss')}</span>,
    },
    {
      title: '调整前',
      dataIndex: 'optBeforeData',
      width: 130,
    },
    {
      title: '调整后',
      dataIndex: 'optAfterData',
      width: 150,
    },
    {
      title: '调整方式',
      dataIndex: 'optDesc',
      width: 130,
    },
    {
      title: '调整人',
      dataIndex: 'creator',
      width: 100,
    },
    {
      title: '锁定状态',
      dataIndex: 'lockStatus',
      width: 150,
      render: lockStatus => (
        <span style={{ color: '#e6a23c' }}>{lockStatus ? '已锁定' : '未锁定'}</span>
      ),
    },
  ];
  return columns;
};
